home *** CD-ROM | disk | FTP | other *** search
- '
- 'Class description:
- '
- !short:Frame class structure:
- Class Frame:
- ~~~~~~~~~~~~
- The frame is defined on the screen, enabled is it to paint, move and delete.
-
- Common use:
- ~~~~~~~~~~~
- LOCAL OBJECT Frame OF Frame
- Frame:Init(Row,Col,RowSize,ColSize)
- Frame:Drag()
- Frame:Done()
-
- Source code is in the C_Frame.prg
-
- !seealso: c_loc.ngo:Loc c_box.ngo:Box c_win.ngo:Win c_window.ngo:Window c_color.ngo:Color ob_class.ngo:"Class hierarchy"
-
- !short:~~~~~~~~~~~~~~~~~~~~~~
- !short:create class Frame from Loc
- !short: export:
- !short: var RowSize //MaxRow()-7
- ^BFrame:RowSize^N: public: numeric
- Actual frame height in number of rows.
-
- !short: var ColSize //MaxCol()-9
- ^BFrame:ColSize^N: public: numeric
- Actual frame width in number of columns.
-
- !short: var MaxRows //MaxRow()-3
- ^BFrame:MaxRows^N: public: numeric
- Maximal allowed frame height in rows. The method Frame:Drag() can change
- the frame sizes only in the range from Frame:MinRows to Frame:MaxRows.
-
- !short: var MaxCols //MaxCol()-1
- ^BFrame:MaxCols^N: public: numeric
- Maximal allowed frame width in columns.The method Frame:Drag() can change
- the frame sizes only in the range from Frame:MinCols to Frame:MaxCols.
-
- !short: var MinRows //1
- ^BFrame:MinRows^N: public: numeric
- Minimal allowed frame height in rows. The method Frame:Drag() can change
- the frame sizes only in the range from Frame:MinRows to Frame:MaxRows.
-
- !short: var MinCols //5
- ^BFrame:MinCols^N: public: numeric
- Minimal allowed frame width in columns.The method Frame:Drag() can change
- the frame sizes only in the range from Frame:MinCols to Frame:MaxCols.
-
- !short: var Screen //""
- ^BFrame:Screen^N: private: character
- The frame background is saved to restore the screen after its deleting.
-
- !short: var Color //ListAsArray(m->Color:Edit)[nEnhanced]
- ^BFrame:Color^N: public: character
- Frame painting color.
-
- !short: var Visible //false
- ^BFrame:Visible^N: read-only: logical
- If true, the frame is painted directly to screen, if false the frame is
- hidden.
-
- !short: method New=FrameNew //o:New() --> self
- ^BFrame:New()^N: public: return self
- The object is filled with default values.
-
- !short: method Init=FrameInit //o:Init(R,C,Rs,Cs,Clr) --> true
- ^BFrame:Init(R,C,Rs,Cs,Clr)^N: public: return true
- If the parameter values are not nil, they are saved to instvar variables
- of the object.
-
- !short: method Paint=FramePaint //o:Paint() --> true
- ^BFrame:Paint()^N: public: return true
- If Frame:Visible==false the frame is painted to the screen and instvar
- variable Frame:Visible is set to true.
-
- !short: method Hide=FrameHide //o:Hide() --> true
- ^BFrame:Hide()^N: public: return true
- If the frame is painted to the screen, it is saved and the further screen
- is refreshed.
-
- !short: method Move=FrameMove //o:Move(dR,dC) --> true
- ^BFrame:Move(dR,dC)^N: public: return true
- The frame is move to new position on the screen. The parameters dR and dC
- are setting the relative move of the frame to old coordinates.
-
- !short: method Size=FrameSize //o:Size(dR,dC) --> true
- ^BFrame:Size(dR,dC)^N: public: return true
- The frame size is changed. The parameters dR and dC are setting the
- relative change of the size to old values. The size change is accepted
- only if the new values are in the allowed range.
-
- !short: method Drag=FrameDrag //o:Drag(lCanSize) --> true/false
- ^BFrame:Drag(lCanSize)^N: public: return true/false
- Reads the keyboard, after the users commands changes the frame size.
- If there was a change it returns true otherwise false.
-
- !short: method Done=FrameDone //o:Done() --> true
- ^BFrame:Done()^N: public: return true
- If the frame is on the sreen it is saved.
-
- !short: endclass
-
-